//
//  PlayerManager.h
//  片刻
//
//  Created by lanou3g on 15/6/10.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AVFoundation/AVFoundation.h>
//不同的播放模式
typedef NS_ENUM(NSInteger, playerModel) {
//循环播放
    playerModelListCycle,
//随机播放
    playerModelRandom,
//单曲播放
    playerModelsingCtcle,
//顺序播放
    playerModelOrder
};
//播放的当前状态
typedef NS_ENUM(NSInteger, playerState) {
    playerStatePlay,
    playerStatePaue
};

@interface PlayerManager : NSObject
{
//    私人方法
    @package NSInteger _playerIndex; //下标
}
@property (nonatomic,retain) AVPlayer *avPlayer; //播放器
@property (nonatomic,retain) AVPlayerItem *avPlayerItme; //播放器内容 例如时间。
@property (nonatomic,retain) NSArray *playerArr; //存网址的数组
@property (nonatomic,assign) playerModel playerModel; //播放模式
@property (nonatomic,assign) playerState playerState; //播放状态
//播放
-(void)play;
//暂停
-(void)pause;
//下一首
-(void)downMusic;
//上一首
-(void)upMusic;
//根据下标来切换音乐
-(void)cehangMusicWithIndex:(NSInteger)index;
//单例 用于 初始化
+(instancetype)sharedManager;
@end












